/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { YogaNodeJNIFinalizer } from './YogaNodeNAPIFinalizer';
import { YogaNode } from './YogaNode';
import { YogaConfig } from './YogaConfig';

export abstract class YogaNodeFactory {
  public static create(config?: YogaConfig): YogaNode {
    if (arguments.length === 0) {
      return new YogaNodeJNIFinalizer();
    }
    return new YogaNodeJNIFinalizer(config) as YogaNode;
  }
}
